home *** CD-ROM | disk | FTP | other *** search
- Path: wkaufman.us.oracle.com!wkaufman
- From: wkaufman@wkaufman.us.oracle.com (William Kaufman)
- Newsgroups: comp.lang.c
- Subject: Re: ?? How to dump text files to screen ??
- Date: 10 Mar 1996 17:42:50 GMT
- Organization: Oracle Corporation, Redwood Shores CA
- Message-ID: <4hv4aq$t0q@inet-nntp-gw-1.us.oracle.com>
- References: <31430CE8.469E@aol2.com>
- NNTP-Posting-Host: wkaufman.us.oracle.com
-
- In article <31430CE8.469E@aol2.com> Neil <neil@aol2.com> writes:
- ] I need help -- how can I open up a text file and just dump it
- ] all out (in plain text) to the screen?
-
- #ifdef unix
- system("cat file");
- #else
- system("type file");
- #endif
-
- Note that this isn't completely portable,...
-
- (Or you fopen() the file and keep reading from the file and writing
- to stdout.)
-
- -- Bill K.
-
- Bill Kaufman | " While not a master of intellect, the blatantly
- wkaufman@us.oracle.com | obvious things we take for granted never
- | escape his keen eye! " -- Bob Burden
-